#FILE NAME: 6711Geo_CLRPSpectra.txt
#MC CODE: TOPAS V3.8 
#DESCRIPTION: Test case 0 – Physics parameters and geometry of the seed for the WAFAC air kerma calculation for 6711 seed; see [reference]
#DISCLAIMER: This file (and associated code/files) is provided in the hope that it will be useful
#but without any warranty; without even the implied warranty of fitness for a particular
#purpose. See full disclaimer at [link]
#COPYRIGHT (C) 2023 Luc Beaulieu (Luc.Beaulieu@phy.ulaval.ca) and Audran Poher
#REDISTRIBUTION: redistribution of this and all associated files is NOT permitted.
#SOURCE OF THIS FILE: [link]


i:Ts/Seed            = 1
i:Ts/NumberOfThreads = 0

b:Gr/Enable           = "F"


i:Ts/ShowHistoryCountAtInterval = 100000#000
b:Ts/IncludeTimeInHistoryCount  = "True"

ic:So/ActiveSource/NumberOfHistoriesInRun    = 1000000#000


# ====================================================== #
#                       PHYSICS                          #
# ====================================================== #

sv:Ph/Default/Modules                  = 1 "g4em-livermore"
d:Ph/Default/CutForElectron            = 1 mm
b:Ph/Default/Auger                     = "T"
b:Ph/Default/AugerCascade              = "T"
b:Ph/Default/Fluorescence              = "T"
b:Ph/Default/DeexcitationIgnoreCut     = "T"




#===============================================
#Whole capsule including every part of the seed
#===============================================

d:Ge/World/HLX      = 0.15 m
d:Ge/World/HLY      = 0.15 m
d:Ge/World/HLZ      = 0.15 m
s:Ge/World/Material = "Vacuum"
#b:Ge/World/Invisible = "TRUE"


##### SOURCE #####
s:So/ActiveSource/Type                       = "Volumetric"
s:So/ActiveSource/Component                 = "ActiveSourceGeometry"
sc:So/ActiveSource/ActiveMaterial            = "MatRadioMatrix"
s:So/ActiveSource/BeamParticle               = "gamma"
b:So/ActiveSource/RecursivelyIncludeChildren = "T"
ic:So:ActiveSource/MaxNumberOfPointsToSample = 1000000000
s:So/ActiveSource/BeamEnergySpectrumType     = "Discrete"

dv:So/ActiveSource/BeamEnergySpectrumValues = 6 27.202 27.472 30.944 30.995 31.704 35.4925 keV

uv:So/ActiveSource/BeamEnergySpectrumWeightsUnscaled = 6 0.396 0.731 0.0674 0.130 0.0375 0.0668
uv:So/ActiveSource/BeamEnergySpectrumWeights = 0.699937006 * So/ActiveSource/BeamEnergySpectrumWeightsUnscaled

# ====================================================== FB #

sv:Ma/MatRadioMatrix/Components = 3 "Silver" "Iodine" "Bromine"
uv:Ma/MatRadioMatrix/Fractions = 3 0.5416 0.30396 0.15444
d:Ma/MatRadioMatrix/Density    = 6.2 g/cm3


##### SOURCE GEOMETRY #####


s:Ge/ActiveSourceGeometry/Type              = "Group"
s:Ge/ActiveSourceGeometry/Parent            = "DryAirCylinder"
#b:Ge/ActiveSourceGeometry/IsParallel        = "True"
#s:Ge/ActiveSourceGeometry/ParallelWorldName = "ActiveSourceWorld"

d:Ge/ActiveSourceGeometry/HLX      = 0 cm
d:Ge/ActiveSourceGeometry/HLY      = 0 cm
d:Ge/ActiveSourceGeometry/HLZ      = 0 cm


#sv:Ph/Default/LayeredMassGeometryWorlds = 1 "ActiveSourceWorld"
#====================
#Radioactive cylinder
#====================

s:Ge/RadioactiveCylinder/Type         = "TsCylinder"
s:Ge/RadioactiveCylinder/Parent       = "ActiveSourceGeometry"
s:Ge/RadioactiveCylinder/Material     = "MatRadioMatrix"
d:Ge/RadioactiveCylinder/RMin         = 0.25 mm
d:Ge/RadioactiveCylinder/RMax         = 0.25175 mm
d:Ge/RadioactiveCylinder/SPhi         = 0. deg
d:Ge/RadioactiveCylinder/DPhi         = 360. deg
d:Ge/RadioactiveCylinder/HL           = 1.325 mm
d:Ge/RadioactiveCylinder/TransX       = 0. mm
d:Ge/RadioactiveCylinder/TransY       = 0. mm
d:Ge/RadioactiveCylinder/TransZ       = 0. mm
d:Ge/RadioactiveCylinder/RotX         = 0. deg
d:Ge/RadioactiveCylinder/RotY         = 0. deg
d:Ge/RadioactiveCylinder/RotZ         = 0. deg
s:Ge/RadioactiveCylinder/DrawingStyle = "Solid"
s:Ge/RadioactiveCylinder/Color        = "yellow"
#b:Ge/RadioactiveCylinder/IsParallel   = "T"
#s:Ge/RadioactiveCylinder/ParallelWorldName = "ActiveSourceWorld"


#=====================
#Radioactive left end
#=====================
s:Ge/RadioactiveLeftEnd/Type                   = "G4Cons"
s:Ge/RadioactiveLeftEnd/Parent                 = "ActiveSourceGeometry"
s:Ge/RadioactiveLeftEnd/Material               = "MatRadioMatrix"
d:Ge/RadioactiveLeftEnd/TransX                 = 0 mm
d:Ge/RadioactiveLeftEnd/TransY                 = 0 mm
d:Ge/RadioactiveLeftEnd/TransZ                 = 1.363375 mm
d:Ge/RadioactiveLeftEnd/RotX                   = 0 deg
d:Ge/RadioactiveLeftEnd/RotY                   = 0 deg
d:Ge/RadioactiveLeftEnd/RotZ                   = 0 deg
d:Ge/RadioactiveLeftEnd/RMin1                  = 0. mm
d:Ge/RadioactiveLeftEnd/RMax1                  = 0.25175 mm
d:Ge/RadioactiveLeftEnd/RMin2                  = 0. mm
d:Ge/RadioactiveLeftEnd/RMax2                  = 0.17675 mm
d:Ge/RadioactiveLeftEnd/HL                     = 0.038375 mm
d:Ge/RadioactiveLeftEnd/SPhi                   = 0 deg
d:Ge/RadioactiveLeftEnd/DPhi                   = 360 deg
s:Ge/RadioactiveLeftEnd/Color                  = "yellow"
s:Ge/RadioactiveLeftEnd/DrawingStyle           = "Solid"
#b:Ge/RadioactiveLeftEnd/IsParallel             = "T"
#s:Ge/RadioactiveLeftEnd/ParallelWorldName      = "ActiveSourceWorld"


#=====================
#Radioactive right end
#=====================
s:Ge/RadioactiveRightEnd/Type                   = "G4Cons"
s:Ge/RadioactiveRightEnd/Parent                 = "ActiveSourceGeometry"
s:Ge/RadioactiveRightEnd/Material               = "MatRadioMatrix"
d:Ge/RadioactiveRightEnd/TransX                 = 0 mm
d:Ge/RadioactiveRightEnd/TransY                 = 0 mm
d:Ge/RadioactiveRightEnd/TransZ                 = -1.363375 mm
d:Ge/RadioactiveRightEnd/RotX                   = 0 deg
d:Ge/RadioactiveRightEnd/RotY                   = 180 deg
d:Ge/RadioactiveRightEnd/RotZ                   = 0 deg
d:Ge/RadioactiveRightEnd/RMin1                  = 0. mm
d:Ge/RadioactiveRightEnd/RMax1                  = 0.25175 mm
d:Ge/RadioactiveRightEnd/RMin2                  = 0. mm
d:Ge/RadioactiveRightEnd/RMax2                  = 0.17675 mm
d:Ge/RadioactiveRightEnd/HL                     = 0.038375 mm
d:Ge/RadioactiveRightEnd/SPhi                   = 0 deg
d:Ge/RadioactiveRightEnd/DPhi                   = 360 deg
s:Ge/RadioactiveRightEnd/Color                  = "yellow"
s:Ge/RadioactiveRightEnd/DrawingStyle           = "Solid"
#b:Ge/RadioactiveRightEnd/IsParallel             = "T"
#s:Ge/RadioactiveRightEnd/ParallelWorldName      = "ActiveSourceWorld"

#====================
#Silver cylinder
#====================

s:Ge/SilverCylinder/Type         = "TsCylinder"
s:Ge/SilverCylinder/Parent       = "ActiveSourceGeometry"
s:Ge/SilverCylinder/Material     = "G4_Ag"
d:Ge/SilverCylinder/RMin         = 0. mm
d:Ge/SilverCylinder/RMax         = 0.25 mm
d:Ge/SilverCylinder/SPhi         = 0. deg
d:Ge/SilverCylinder/DPhi         = 360. deg
d:Ge/SilverCylinder/HL           = 1.325 mm
d:Ge/SilverCylinder/TransX       = 0. mm
d:Ge/SilverCylinder/TransY       = 0. mm
d:Ge/SilverCylinder/TransZ       = 0. mm
d:Ge/SilverCylinder/RotX         = 0. deg
d:Ge/SilverCylinder/RotY         = 0. deg
d:Ge/SilverCylinder/RotZ         = 0. deg
s:Ge/SilverCylinder/DrawingStyle = "Solid"
s:Ge/SilverCylinder/Color        = "grey"
#b:Ge/SilverCylinder/IsParallel   = "T"
#s:Ge/SilverCylinder/ParallelWorldName = "ActiveSourceWorld"


#=================
#Silver left end
#=================

s:Ge/SilverLeftEnd/Type                   = "G4Cons"
s:Ge/SilverLeftEnd/Parent                 = "RadioactiveLeftEnd"
s:Ge/SilverLeftEnd/Material               = "G4_Ag"
d:Ge/SilverLeftEnd/TransX                 = 0 mm
d:Ge/SilverLeftEnd/TransY                 = 0 mm
d:Ge/SilverLeftEnd/TransZ                 = -0.000875 mm
d:Ge/SilverLeftEnd/RotX                   = 0 deg
d:Ge/SilverLeftEnd/RotY                   = 0 deg
d:Ge/SilverLeftEnd/RotZ                   = 0 deg
d:Ge/SilverLeftEnd/RMin1                  = 0 mm
d:Ge/SilverLeftEnd/RMax1                  = 0.25 mm
d:Ge/SilverLeftEnd/RMin2                  = 0 mm
d:Ge/SilverLeftEnd/RMax2                  = 0.175 mm
d:Ge/SilverLeftEnd/HL                     = 0.0375 mm
d:Ge/SilverLeftEnd/SPhi                   = 0 deg
d:Ge/SilverLeftEnd/DPhi                   = 360 deg
s:Ge/SilverLeftEnd/Color                  = "grey"
s:Ge/SilverLeftEnd/DrawingStyle           = "Solid"
#b:Ge/SilverLeftEnd/IsParallel             = "T"
#s:Ge/SilverLeftEnd/ParallelWorldName      = "ActiveSourceWorld"


#=================
#Silver right end
#=================

s:Ge/SilverRightEnd/Type                   = "G4Cons"
s:Ge/SilverRightEnd/Parent                 = "RadioactiveRightEnd"
s:Ge/SilverRightEnd/Material               = "G4_Ag"
d:Ge/SilverRightEnd/TransX                 = 0 mm
d:Ge/SilverRightEnd/TransY                 = 0 mm
d:Ge/SilverRightEnd/TransZ                 = -0.000875 mm
d:Ge/SilverRightEnd/RotX                   = 0 deg
d:Ge/SilverRightEnd/RotY                   = 0 deg
d:Ge/SilverRightEnd/RotZ                   = 0 deg
d:Ge/SilverRightEnd/RMin1                  = 0 mm
d:Ge/SilverRightEnd/RMax1                  = 0.25 mm
d:Ge/SilverRightEnd/RMin2                  = 0 mm
d:Ge/SilverRightEnd/RMax2                  = 0.175 mm
d:Ge/SilverRightEnd/HL                     = 0.0375 mm
d:Ge/SilverRightEnd/SPhi                   = 0 deg
d:Ge/SilverRightEnd/DPhi                   = 360 deg
s:Ge/SilverRightEnd/Color                  = "grey"
s:Ge/SilverRightEnd/DrawingStyle           = "Solid"
#b:Ge/SilverRightEnd/IsParallel             = "T"
#s:Ge/SilverRightEnd/ParallelWorldName      = "ActiveSourceWorld"


##### SHIELDING #####




#=====================
#Cylinder of Titanium
#=====================

s:Ge/TitaniumCylinder/Type         = "TsCylinder"
s:Ge/TitaniumCylinder/Parent       = "World"
s:Ge/TitaniumCylinder/Material     = "Titanium"
d:Ge/TitaniumCylinder/RMin         = 0.33 mm
d:Ge/TitaniumCylinder/RMax         = 0.40 mm
d:Ge/TitaniumCylinder/SPhi         = 0. deg
d:Ge/TitaniumCylinder/DPhi         = 360. deg
d:Ge/TitaniumCylinder/HL           = 1.875 mm
d:Ge/TitaniumCylinder/TransX       = 0. mm
d:Ge/TitaniumCylinder/TransY       = 0. mm
d:Ge/TitaniumCylinder/TransZ       = 0. mm
d:Ge/TitaniumCylinder/RotX         = 0. deg
d:Ge/TitaniumCylinder/RotY         = 0. deg
d:Ge/TitaniumCylinder/RotZ         = 0. deg
s:Ge/TitaniumCylinder/Color        = "blue"
s:Ge/TitaniumCylinder/DrawingStyle = "Solid"
#b:Ge/TitaniumCylinder/IsParallel   = "T"
#s:Ge/TitaniumCylinder/ParallelWorldName = "SeedsWorld"


#===============================
#Left half-sphere of Titanium 
#===============================

s:Ge/TitaniumLeftCap/Type         = "TsSphere"
s:Ge/TitaniumLeftCap/Parent       = "World"
s:Ge/TitaniumLeftCap/Material     = "Titanium"
d:Ge/TitaniumLeftCap/RMin         = 0. mm
d:Ge/TitaniumLeftCap/RMax         = 0.4 mm
d:Ge/TitaniumLeftCap/SPhi         = 0. deg
d:Ge/TitaniumLeftCap/DPhi         = 360. deg
d:Ge/TitaniumLeftCap/STheta       = 0. deg
d:Ge/TitaniumLeftCap/DTheta       = 90. deg
d:Ge/TitaniumLeftCap/TransX       = 0. mm
d:Ge/TitaniumLeftCap/TransY       = 0. mm
d:Ge/TitaniumLeftCap/TransZ       = 1.875 mm
d:Ge/TitaniumLeftCap/RotX         = 0. deg
d:Ge/TitaniumLeftCap/RotY         = 0. deg
d:Ge/TitaniumLeftCap/RotZ         = 0. deg
s:Ge/TitaniumLeftCap/DrawingStyle = "Solid"
s:Ge/TitaniumLeftCap/Color        = "blue"
#b:Ge/TitaniumLeftCap/IsParallel   = "T"
#s:Ge/TitaniumLeftCap/ParallelWorldName = "SeedsWorld"

#================================
#Right half-sphere of titanium
#================================

s:Ge/TitaniumRightCap/Type         = "TsSphere"
s:Ge/TitaniumRightCap/Parent       = "World"
s:Ge/TitaniumRightCap/Material     = "Titanium"
d:Ge/TitaniumRightCap/RMin         = 0. mm
d:Ge/TitaniumRightCap/RMax         = 0.4 mm
d:Ge/TitaniumRightCap/SPhi         = 0. deg
d:Ge/TitaniumRightCap/DPhi         = 360. deg
d:Ge/TitaniumRightCap/STheta       = 0. deg
d:Ge/TitaniumRightCap/DTheta       = 90. deg
d:Ge/TitaniumRightCap/TransX       = 0. mm
d:Ge/TitaniumRightCap/TransY       = 0. mm
d:Ge/TitaniumRightCap/TransZ       = -1.875 mm
d:Ge/TitaniumRightCap/RotX         = 180. deg
d:Ge/TitaniumRightCap/RotY         = 0. deg
d:Ge/TitaniumRightCap/RotZ         = 0. deg
s:Ge/TitaniumRightCap/DrawingStyle = "Solid"
s:Ge/TitaniumRightCap/Color        = "blue"
#b:Ge/TitaniumRightCap/IsParallel   = "T"
#s:Ge/TitaniumRightCap/ParallelWorldName = "SeedsWorld"



#====================
#Dry Air cylinder
#====================

s:Ge/DryAirCylinder/Type         = "TsCylinder"
s:Ge/DryAirCylinder/Parent       = "World"
s:Ge/DryAirCylinder/Material     = "G4_AIR"
d:Ge/DryAirCylinder/RMin         = 0. mm
d:Ge/DryAirCylinder/RMax         = 0.33 mm
d:Ge/DryAirCylinder/SPhi         = 0. deg
d:Ge/DryAirCylinder/DPhi         = 360. deg
d:Ge/DryAirCylinder/HL           = 1.875 mm
d:Ge/DryAirCylinder/TransX       = 0. mm
d:Ge/DryAirCylinder/TransY       = 0. mm
d:Ge/DryAirCylinder/TransZ       = 0. mm
d:Ge/DryAirCylinder/RotX         = 0. deg
d:Ge/DryAirCylinder/RotY         = 0. deg
d:Ge/DryAirCylinder/RotZ         = 0. deg
s:Ge/DryAirCylinder/DrawingStyle = "Solid"
s:Ge/DryAirCylinder/Color        = "white"
#b:Ge/DryAirCylinder/IsParallel   = "T"
#s:Ge/DryAirCylinder/ParallelWorldName = "SeedsWorld"



#=====================
#Graphics Components
#=====================

#Ge/QuitIfOverlapDetected     = "F"
s:Gr/ViewA/Type              = "OpenGL"
#i:Gr/ViewA/WindowSizeX      = 1024
#i:Gr/ViewA/WindowSizeY      = 768
b:Gr/ViewA/IncludeAxes       = "F"
d:Gr/ViewA/Theta             = 90. deg
d:Gr/ViewA/Phi               = 0. deg
s:Gr/ViewA/Projection       = "Perspective"
d:Gr/ViewA/PerspectiveAngle = 30. deg
u:Gr/ViewA/Zoom              = 100

s:Gr/ViewA/CenterOn = "World"

b:Ts/PauseBeforeQuit = "F"

